package com.rbac.controller.test.admin;

import com.common.Result;
import com.rbac.pojo.Department;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/admin/department")
public class adminDepartmentController {

    @GetMapping("/list")
    public Result getAllDepartments(){
        return Result.success("管理员查询全部部门");
    }
    @PostMapping()
    public Result addDepartment(@RequestBody Department department){
        return Result.success("管理员添加部门");
    }
    @PutMapping()
    public Result updateDepartment(@RequestBody Department department){
        return Result.success("管理员修改部门");
    }
    @GetMapping("/{id}")
    public Result getDepartmentById(Integer id){
        return Result.success("管理员根据id查询部门");
    }
    @DeleteMapping("/{id}/delete")
    public Result deleteDepartment(Integer id){
        return Result.success("管理员根据id删除部门");
    }
}
